//
//  TQModule.swift
//  HandyJSON
//
//  Created by tangquan on 2023/7/3.
//

import UIKit
import TQRouter

public class Kit: NSObject {}

extension Kit: FeatureModuleInteraction {
    public static func getModule(injection: FeatureModuleInjection) -> FeatureModule? {
        guard let shareModule = injection.paramter["to"] as? String else {
            return getDefault(injection: injection)
        }
        switch shareModule {
        case "TQController":
            return FeatureModule(title: "TQController", instance: TQController() as! ShareModuleBridgeable)
        default:
            return FeatureModule(title: "InDevelopment", instance: TQController() as! ShareModuleBridgeable)
        }
    }

    

    static func getDefault(injection: FeatureModuleInjection) -> FeatureModule? {
        return nil
    }

    public static var shortVersion: String {
        return moduleBundle.shortVersion
    }

    public static var bundleName: String {
        return moduleBundle.bundleName
    }

    public static var moduleBundle: Bundle {
        return Bundle(for: classForCoder())
    }
}
